﻿using SDT.CodeSystem.Data;
namespace SDT.CodeSystem
{
    /// <summary>
    /// Written by SinhNT
    /// </summary>
    public sealed class District : IDistrict
    {
        internal District(ICity city, int Id, string Name, string ShortName, int nItems)
        {
            this.theCity = city;
            this.id = Id;
            this.name = Name;
            this.shortName = ShortName;
            this.nitems = nItems;
        }

        #region IDistrict Members
        private ICity theCity = null;
        public ICity TheCity
        {
            get { return theCity; }
        }

        private int id = 0;
        public int Id
        {
            get { return id; }
        }

        private string name = string.Empty;
        public string Name
        {
            get { return name; }
        }

        private string shortName = string.Empty;
        public string ShortName
        {
            get { return shortName; }
        }

        private int nitems = 0;
        public int nItems
        {
            get { return nitems; }
        }
        #endregion

        public static ICity GetCity(int distId)
        {
            return Repository.LoadCity(distId);
        }
    }
}